<?php
foreach ($model as $value) {
    $item = $this->findNews($value->id);
    ?>
    <div class="post">
        <div class="title"><i class="icon12-title"></i><?php echo CHtml::link($value->name, array('/' . $value->linkViewNews .'-c'.$value->id .'.html')); ?></div>

        <div class="media">
            <?php
            if (!empty($item)) {
                echo CHtml::link(CHtml::image(Yii::app()->request->baseUrl . '/uploads/thumb/' . $item[0]->image, $item[0]->name), array('/' . $item[0]->detail . '-' . $item[0]->id . '.html'), array('class' => 'pull-left'));
                ?>
                <div class="media-body">
                    <h4 class="media-heading"><?php echo CHtml::link($item[0]->name, array('/' . $item[0]->detail . '-' . $item[0]->id . '.html')); ?></h4>
                    <p><?php echo $item[0]->content ?></p>
                </div>
            <?php } ?>
        </div>
        <ul class="nav">
            <?php
            foreach ($item as $key => $v) {
                if ($key > 0) {
                    ?>
                    <li><?php echo CHtml::link('<i class="icon10-n"></i>' . $v->name . ' ' . date('m/d/Y', $v->create_time), array('/' . $v->detail . '-' . $v->id . '.html')); ?></li>
                    <?php
                }
            }
            ?>
        </ul>

    </div>
<?php } ?>
